<template>
	<view>

	</view>
</template>

<script setup>
	import { onLoad } from "@dcloudio/uni-app";
	import { getCookbookDetailApi } from "../../../api/cookbook";
	import { ref } from "vue";

	const detailItem = ref({});

	onLoad((options) => {
		getDetailById(options);
	})


	const getDetailById = (options) => {
		getCookbookDetailApi({
				_id: options._id
			})
			.then(res => {
				if (res.code == 200) {
					detailItem.value = res.data;
					// 动态设置顶部导航栏标题文字
					uni.setNavigationBarTitle({
						title: res.data.name
					})
				}
			})
	}
</script>

<style>

</style>